<?php  
require 'functions.php';
require_once '../data/data.php';

$id = $_GET['id'];

$sql = 'delete from students where id=?';
$args = [$id];
$affected = execute($sql,$args);
if ($affected == 1) {
	success('删除成功','../index.php');
}else{
	error('删除失败','../index.php');
}
?>